//
//  HomeTableViewController.m
//  YSZC
//
//  Created by 张斌 on 16/4/15.
//  Copyright © 2016年 YueShiKeJi. All rights reserved.
//

#import "HomeTableViewController.h"
#import "HomeTableViewCell.h"
#import "LoadVcManager.h"

@interface HomeTableViewController ()


@end

@implementation HomeTableViewController
- (IBAction)Touzizhinanbtnclick:(UIButton *)sender {
    // 投资指南
    [self.navigationController pushViewController:[LoadVcManager sbVCWithsbname:@"TouzizhinanViewController"] animated:YES];
}
- (IBAction)Pingtaigonggaobtnclick:(UIButton *)sender {
    // 平台公告
    [self.navigationController pushViewController:[LoadVcManager sbVCWithsbname:@"PingtaigonggaoViewController"] animated:YES];
}
- (IBAction)yingshizhongxinbtnclick:(UIButton *)sender {
    // 影视中心
    
     [self.navigationController pushViewController:[LoadVcManager sbVCWithsbname:@"YingshizhongxinTableViewController"] animated:YES];
    
}
- (IBAction)xinshouyindaobtnclick:(UIButton *)sender {
    // 新手引导
    [self.navigationController pushViewController:[LoadVcManager sbVCWithsbname:@"XinshouyindaoTableViewController"] animated:YES];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    self.tableView.allowsSelection=NO;
    self.tableView.separatorStyle= UITableViewCellSeparatorStyleNone;
    
    self.tableView.estimatedRowHeight = 400;
    self.tableView.rowHeight = UITableViewAutomaticDimension;
}
- (IBAction)leftbtnclick:(UIBarButtonItem *)sender {
    [self dismissViewControllerAnimated:YES completion:nil];
}

-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
    return 1;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return 8;
}
- (UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    HomeTableViewCell * cell;
    if (indexPath.row == 0) {
            cell = [tableView dequeueReusableCellWithIdentifier:@"HomeCell1" forIndexPath:indexPath];
    }else{
        cell = [tableView dequeueReusableCellWithIdentifier:@"HomeCell2" forIndexPath:indexPath];
        
        cell.line.constant = 0.5;
        cell.imgheight.constant = 200;
    }
    return cell;
}


@end
